# 测试用例执行入口
import unittest
import time

from uitls.HTMLTestRunner import HTMLTestRunner

from scripts.test_weather_forecaset import TestWeatherForecast

# 封装测试套件
suite =unittest.TestSuite()
# 添加测试脚本
suite.addTest(unittest.makeSuite(TestWeatherForecast))



#  指定报告路径
report = "./report/suite_report/repor-{}.html".format(time.strftime("%Y%m%d-%H%M%S"))

# 打开文件流
with open(report,"wb") as f :
    # 创建HTMLTestRunner执行器
    runner = HTMLTestRunner(f,title="weather 接口")
    # 执行测试套件
    runner.run(suite)
